package com.wizinno.android.urineflow.data;

import lombok.Getter;

/**
 * @author LiuMei
 * @date 2020-12-14.
 */
@Getter
public enum SteeringStatusEnum {
    STEERING_STATUS_0(0x00, "水平0度"),
    STEERING_STATUS_90(0x01, "垂直90度"),
    STEERING_STATUS_WASHING(0x03, "涮洗中"),
    STEERING_STATUS_TEST(0x04, "调试状态"),
    ;
    private int code;
    private String desc;

    SteeringStatusEnum(int i, String s) {
        this.code = i;
        this.desc = s;
    }

    public static String getDesc(byte code) {
        SteeringStatusEnum[] values = SteeringStatusEnum.values();
        for (SteeringStatusEnum value : values) {
            if (value.code == code) {
                return value.desc;
            }
        }
        return "未知";
    }
}
